package com.foreverwin.jzymes.common.mapper;

import com.foreverwin.jzymes.common.domain.TwoHourYield;
import com.foreverwin.jzymes.common.domain.YieldLog;
import com.foreverwin.jzymes.eap.domain.ResourceTimeLog;
import com.foreverwin.jzymes.qc.check.domain.QcCheck;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface DashBoardAdviceMapper {


    public TwoHourYield findTwoHourYield(@Param("site") String site, @Param("operation") String operation, @Param("itemBo") String itemBo, @Param("date") Date date );

    public int updateTwoHourYield( TwoHourYield twoHourYield );

    public int insertTwoHourYield( TwoHourYield twoHourYield );

    public List<TwoHourYield> findTwoHourYieldByDateRange( @Param("site") String site, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime );

    public List<Map<String,Object>> findGoodsReceiptByDateRange( @Param("site") String site, @Param("grType") String grType, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime );

    public List<Map<String,String>> findCncResourceListByWorkCenter( @Param("workCenterBo") String workCenterBo );

    public List<QcCheck> findQcCheck( @Param("site") String site, @Param("resource") String resource, @Param("taskType") String taskType, @Param("taskStatus") String taskStatus, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime );

    public YieldLog findYieldLog(@Param("site") String site, @Param("operation") String operation, @Param("itemBo") String itemBo, @Param("date") Date date );

    public List<YieldLog> findYieldLogByDateRange( @Param("site") String site, @Param("operation") String operation, @Param("itemBo") String itemBo, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime );

    public List<ResourceTimeLog> findPendingResourceTimeLogList( String site );

    public List<Map<String,Object>> countResourceTimeSummary( @Param("site") String site, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime );

    public Map<String,Object> findResourceTimeSummary( @Param("site") String site, @Param("resrce") String resrce, @Param("status") String status, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime );

    public List<Map<String,Object>> findNcDataSummaryByOperation( @Param("site") String site, @Param("operation") String operation, @Param("date") Date date );

    public List<Map<String,Object>> findNcDataSummaryByNcCode( @Param("site") String site, @Param("operation") String operation, @Param("ncCode") String ncCode, @Param("date") Date date );

    public List<Map<String,Object>> findFqcNcSummaryByDate( @Param("site") String site, @Param("date") Date date );

    public List<Map<String,Object>> findFqcNcSummaryByNcCode( @Param("site") String site, @Param("ncCode") String ncCode, @Param("date") Date date );
}
